<?php

namespace App\Http\Controllers\Auth;

use Illuminate\Support\Facades\Config;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Germey\Geetest\GeetestCaptcha;

class AuthController extends Controller
{
    use GeetestCaptcha;

    /**
     * 服务端验证 极验验证
     * 在ORM执行插入时,记得在Model中屏蔽下面的字段
     * protected $guarded = ['geetest_challenge', 'geetest_validate', 'geetest_seccode'];
     * add by vicleo 20170207
     */
    public function postValidate(Request $request)
    {
    	$result = $this->validate($request, [
    		'geetest_challenge' => 'geetest'
    	],[
    		'geetest' => Config::get('geetest.server_fail_alert')
    	]);

    	if ($request) {
    		return 'success';
    	}
    }
}
